package com.onLineCar.driver.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author The future is full of hope
 * @CreateTime 2023/12/14 0014 21:06
 * @PackageName:com.onLineCar.driver.config
 * @ClassName: MybatisPlusConfig
 */

/**
 * mybatisPlus配置
 */
@Configuration
public class MybatisPlusConfig {

    @Bean(name = "mybatisPlusConfigDriver")
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }

}
